feat: migrate to Vite+ (rebase of #155 onto Angular 22 main)#180
Open
chrisjwalk-bot wants to merge 24 commits into
Open
feat: migrate to Vite+ (rebase of #155 onto Angular 22 main)#180chrisjwalk-bot wants to merge 24 commits into
chrisjwalk-bot wants to merge 24 commits into
Conversation
phase 1) - Add package.json to all 7 libs for Vite+ workspace ordering - Replace vite-tsconfig-paths plugin with Vite 8 native resolve.tsconfigPaths - Replace ESLint with Oxlint (.oxlintrc.json via vp migrate) - Migrate Prettier config to vite.config.ts fmt block via vp fmt --migrate - Remove all eslint.config.cjs files from root and all libs - Remove lint targets from all project.json files - Rename vite.config.mts -> vite.base.config.mts (shared base config) - Create new root vite.config.ts for vite-plus workspace task config - Add vite-plus ^0.1.20 to devDependencies - Remove: eslint, prettier, eslint-config-prettier, vite-tsconfig-paths, @nx/eslint, @nx/eslint-plugin from devDependencies - Update .lintstagedrc.cjs to use vp lint / vp fmt - Fix .oxlintrc.json: remove invalid @nx, @angular-eslint, @/ plugin refs - Apply vp fmt formatting to all files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add 'test: vitest run' script to all 7 lib package.json files - Add name/scripts to apps/web-app/package.json (test + build) - Remove Nx @nx/vitest:test targets from all lib project.json files - Remove Nx test target from web-app project.json (replaced by package.json) - Update root package.json: test:all/lint/format scripts use vp run - Rename root build/test scripts to build:all/test:all to avoid vp/Nx conflicts - Fix vite.base.config.mts: pass tsconfig.spec.json to Angular plugin (silences tsconfig.app.json warnings in libs during vp run) - Run: 'vp run -r test' now runs all 8 packages' unit tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace nxViteTsPaths() with native resolve.tsconfigPaths in update-packages/vite.config.mts - Remove @nx/vite from devDependencies - Remove stale @nx/eslint:lint target from dotnet-builder/project.json - Update CI: lint/test steps now use vp lint / vp run -r test (no more nx affected) - Bump pnpm action version from 10 to 11 to match packageManager field Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add .oxlintrc.json overrides: disable no-explicit-any and no-non-null-assertion in spec files, and no-explicit-any in tools/builders (intentional casts) - Add oxlint-disable comment in NextStepsRunner.tsx for intentional useEffect deps - Fix erasing-op warning: 0 * 1000 → 0 in auth.store.spec.ts - Fix no-empty-file: add export to update-packages test-setup.ts - Add lint.options.typeAware: false to vite.config.ts (tsgolint incompatible with Angular baseUrl / moduleResolution:bundler tsconfig options) vp check now exits clean: fmt pass, lint pass, 0 warnings, 0 errors Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add test.projects to vite.config.ts so vp test delegates to each package's vite config (which has the Angular plugin properly set up). Uses Vitest 4 projects API (test.workspace was removed in v4). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Switch from defineConfig(fn) to defineConfig({}) so vp fmt/check can
read the fmt field without executing plugin code
- Wrap Angular/PWA plugins with lazyPlugins() so they only instantiate
during build/dev, not when tooling loads the config
- Replace __dirname with import.meta.dirname throughout
- Remove define.import.meta.vitest (required function wrapper)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…currently - pnpm start now runs both the .NET API and Angular dev server concurrently (matching the old nx serve web-app behaviour) - Add pnpm dev (vp dev), pnpm build (vp build), pnpm check (vp check) - Add pnpm serve:api for standalone API server - Remove all stale nx-dependent scripts (affected:*, dep-graph, etc.) - Add concurrently as devDependency Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace nxE2EPreset and @nx/devkit workspaceRoot with plain path.resolve - Replace nx webServer commands with dotnet run + vp dev - Update baseURL from 4200 to 5173 (Vite default port) - Update pnpm e2e to call playwright directly (no nx) - Remove @nx/playwright and @nx/devkit devDependencies Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove nx, @nx/angular, @nx/esbuild, @nx/js, @nx/node, @nx/vitest, @nx/web, @nx/workspace devDependencies - Remove @trivago/prettier-plugin-sort-imports (replaced by Oxfmt importOrder) - Delete nx.json, migrations.json, and all project.json files - Remove .nx ignore entries from vite.config.ts fmt and .oxlintrc.json - Remove nxConsole VSCode setting - Remove .nx from pnpm clean script Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove ESLint packages (replaced by Oxlint) - Remove ts-node, @swc-node/register, @swc/core, @swc/helpers (unused) - Remove prismjs (replaced by shiki), dotenv (unused) - Remove tools/update-packages/eslint.config.cjs (dead config) - Replace nx migrate with pnpm up --latest in update-packages tool - Remove MigrationTask.hasMigrations and migrations.json merging logic - Remove __nx__ task grouping from buildMigrationQueue - Update SKILL.md to reflect new update workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pnpm/action-setup@v4 reads the version from packageManager in package.json automatically. Having both causes ERR_PNPM_BAD_PM_VERSION. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pnpm 11 requires explicit approval of packages that run build scripts. Add onlyBuiltDependencies to silence ERR_PNPM_IGNORED_BUILDS in CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The migration commit added an allowBuilds block with placeholder string
values ('set this to true or false') instead of booleans, which caused
pnpm to exit with ERR_PNPM_IGNORED_BUILDS in CI.
onlyBuiltDependencies was already correct in pnpm-workspace.yaml (from
main) and is the right mechanism for pnpm 11. Removed allowBuilds and
reverted the redundant package.json onlyBuiltDependencies addition.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
onlyBuiltDependencies was removed in pnpm v11 and replaced by allowBuilds. Set all required native build packages to true. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace 'pnpm nx affected' build with 'pnpm build:prod' (vp build). Remove Pack step — no equivalent in vite+ migration. Remove Nx base ref setup step. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add fileReplacements to root vite.config.ts so NX_TASK_TARGET_CONFIGURATION=preview swaps environment.ts with environment.preview.ts (pointing to Azure backend). Update preview.yml to use 'pnpm build:prod' with that env var instead of 'pnpm nx'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- README.md: remove Nx references, update tooling to Vite+, remove home.md sync note, fix pnpm version (11+), fix test command (test:all) - content/home.md: replace README clone with app-focused landing page (feature links, notifications, PWA blurb, source link) - home.ts: update hero title/subtitle to remove Nx references - assets/home.md: delete stale auto-generated file (was synced from README) - ngsw-config.json: remove /assets/home.md from service worker cache Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merge feat/migrate-to-vite-plus-155 onto main, resolving conflicts: - vite.config.ts: Kept MFE federation config with updated Angular 22 shared deps - package.json: Removed Nx/ESLint/Prettier, added vite-plus/oxlint, updated all to main versions - CI workflows: Updated to use pnpm build:prod (vp build) with PREVIEW env var - pnpm-workspace.yaml: Clean main version with hono >=4.12.21 override - Deleted: nx.json, project.json files, eslint configs, prettier configs - Added: .oxlintrc.json, lib package.json entries, vite-plus configs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add resolve.alias to map counter-remote/Routes to local stub during vite test mode. The @module-federation/vite plugin doesn't virtualize remote modules in vitest, so we need an explicit alias for integration tests. Also add fastCompile: mode === 'test' from main branch's vite config. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pnpm v11 reads overrides from pnpm-workspace.yaml only. The packageManager field is kept to pin pnpm@11.0.9. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The package.json already declares 'packageManager: pnpm@11.0.9' which causes pnpm/action-setup@v6 to error when version: 11 is also specified. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-180.eastus2.2.azurestaticapps.net |
- Add STUB_MFE_REMOTES env to Playwright webServer so E2E dev server resolves counter-remote/Routes to the local test stub - Update lint-staged to use 'vp check --fix' (format + lint + types) - Remove Nx nxViteTsPaths plugin from counter-remote (use vite tsconfigPaths instead) - Add counter-remote to pnpm start (concurrently starts all 3 servers: API, web-app host, counter-remote MFE) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-180.eastus2.2.azurestaticapps.net |
) - Add federation plugin + MFE shared deps to root vite.config.ts (root config drives vp dev; was missing federation entirely) - Add STUB_MFE_REMOTES alias so E2E/CI can load without counter-remote - Enable Analog fastCompile when STUB_MFE_REMOTES is set - Replace lint-staged + .lintstagedrc.cjs with vp staged in vite.config.ts - Update husky pre-commit to use vp staged instead of npx lint-staged - Remove lint-staged devDependency - Fix E2E hero heading regex (escaped dot to escaped plus) - Fix E2E navigation strict-mode violations (scope to toolbar/sidenav) - All 66 E2E tests pass (4 skipped, 0 failures) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-180.eastus2.2.azurestaticapps.net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #155
This rebases the
feat/migrate-to-vite-plus-155branch onto latest main (Angular 22, MFE federation, E2E CI).Changes
@nx/*,nx,project.jsonfiles,migrations.json,nx.json.oxlintrc.jsonvp dev,vp build,vp test,vp lint,vp fmt,vp check— much faster builds@module-federation/vitefederation config with Angular 22 shared deps in rootvite.config.tsSTUB_MFE_REMOTES=trueresolvescounter-remote/Routesto local stub via alias +fastCompilelint-staged+.lintstagedrc.cjswithstagedkey invite.config.tsvpcommands, kept E2E tests with PlaywrightPREVIEW=true vp buildfor preview environmentVerification
pnpm build:prod— builds 93 chunks in ~6spnpm test:all— 37 test files, 221 tests passpnpm e2e— 66 passed, 4 skipped, 0 failurespnpm lint/pnpm fmt— oxlint/oxfmtpnpm start— starts API + web + counter-remote serversNotes
pnpm.overridesmoved frompackage.jsontopnpm-workspace.yaml(pnpm v11 requirement)vp stagedrunsvp check --fixon pre-commit (format + lint + type checks)